home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 10
/
The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso
/
PC_SIGCD
/
26
/
3
/
DISK2631.ZIP
/
EXAMP1.ZIP
/
UMEX233.BAS
< prev
next >
Wrap
BASIC Source File
|
1990-03-29
|
1KB
|
43 lines
'User's Manual Example, Page 234.
DEFINT a-z
SCREEN 1
CALL backgrd
CALL drawcircles 'normal--no viewpoint
X$ = INPUT$(1)
CALL backgrd 'viewport set to middle, orginal at upper left
CALL drawcircles
VIEW SCREEN (75,60)-(220,140)
X$ = INPUT$(1)
CALL backgrd 'same viewport, but original reletive to viewport
VIEW SCREEN (75,60)-(220,140)
CALL drawcircles
X$ = INPUT$(1)
CLS 'note that only viewport is cleared
X$ = INPUT$(1)
END
SUB backgrd 'create a noisy background
VIEW 'reset to full screen
CLS
FOR i = 1 TO 20
c = 1 + i MOD 3
LINE(INT(RND*50)+10,INT(RND*90)+10)-(INT(RND*50)+250,INT(RND*100)+60),c
NEXT i
END SUB
SUB drawcircles 'draw circles and fill them
FOR i = 1 TO 30
x = INT(RND*80) + 80
y = INT(RND*80) + 40
c = 1 + i MOD 3 'cycle through colors
CIRCLE (x,y), INT(RND*15)+5,c
PAINT (x,y),c
NEXT i
END SUB